﻿using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;


namespace CPPProject.CPP
{
    /// <summary>
    /// 资产结构
    /// </summary>
    [Table("CPPPartBOM")]
    public class CPPPartBOM : Entity<Guid>, IHasCreationTime, IMustHaveTenant, IModificationAudited
    {
        public int TenantId { get; set; }
        public DateTime CreationTime { get; set; }
        public long? LastModifierUserId { get; set; }
        public DateTime? LastModificationTime { get; set; }
        /// <summary>
        /// 资产编码
        /// </summary>
        [Required]
        [MaxLength(50)]
        public string PartNum { get; set; }
        /// <summary>
        /// 资产外键
        /// </summary>
        public Guid PartId { get; set; }
        [ForeignKey("PartId")]
        public virtual CPPPart TPart { get; set; }
        /// <summary>
        /// 父级资产ID
        /// </summary>
        public Guid? ParentId { get; set; }
        /// <summary>
        /// 数量
        /// </summary>
        public decimal Quantity { get; set; }
    }
}
